home *** CD-ROM | disk | FTP | other *** search
- from PSPApp import *
-
- def ScriptProperties():
- return {
- 'Author': u'Corel Corporation',
- 'Copyright': u'Copyright (c) 2002-2006 Corel Corporation. All rights reserved.',
- 'Description': "Toggle between precise cursors and show brush outlines.",
- 'Host': u'Paint Shop Pro',
- 'Host Version': u'8.00'
- }
-
- def Do(Environment):
- # start by getting the current set of preferences
- CurrentPrefs = App.Do( Environment, 'ReturnGeneralPreferences' )
-
- # if brush outlines are on we will turn them off and turn on precise cursors.
- if CurrentPrefs[ 'Display' ][ 'BrushOutlines' ] == App.Constants.Boolean.true:
- print 'Turning brush outline on'
- App.Do( Environment, 'GenPreferences', {
- 'Display': {
- 'PreciseCursors': App.Constants.Boolean.true,
- 'BrushOutlines': App.Constants.Boolean.false,
- },
- 'GeneralSettings': {
- 'ExecutionMode': App.Constants.ExecutionMode.Silent,
- 'AutoActionMode': App.Constants.AutoActionMode.Match
- }
- })
- else: # if off then turn them on and turn precise off
- print 'Turning brush outline off'
- App.Do( Environment, 'GenPreferences', {
- 'Display': {
- 'PreciseCursors': App.Constants.Boolean.false,
- 'BrushOutlines': App.Constants.Boolean.true,
- },
- 'GeneralSettings': {
- 'ExecutionMode': App.Constants.ExecutionMode.Silent,
- 'AutoActionMode': App.Constants.AutoActionMode.Match
- }
- })
-
-